package com.sprometheus.strategy.feishu;

import com.sprometheus.config.FeishuNoticeProperties;
import com.sprometheus.core.constants.SendChannel;
import com.sprometheus.core.pojo.Groups;
import com.sprometheus.strategy.RoutingStrategy;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Set;

/**
 * 飞书策略
 *
 * @author 风白羽
 * @date 2024/9/6 上午9:39
 */
@Service(SendChannel.FEISHU)
public class FeishuStrategy implements RoutingStrategy {

    @Resource
    private FeishuNoticeProperties feishuNoticeProperties;

    @Override
    public boolean isEnabled() {
        return feishuNoticeProperties.isEnabled();
    }

    @Override
    public Set<String> getIncludedTracePackage() {
        return feishuNoticeProperties.getIncludedTracePackage();
    }

    @Override
    public Set<Groups> getBusiness() {
        return feishuNoticeProperties.getBusiness();
    }

    @Override
    public Set<Groups> getDeveloper() {
        return feishuNoticeProperties.getDeveloper();
    }
}
